<style>
/* 重写样式 */
.fui-header.block {
    display: block;
}

.fui-tab {
    margin: 0;
}

.fui-tab a {
    height: 2.2rem;
    line-height: 2.2rem;
}

.fui-tab:after {
    display: none;
}
.nickname {
    color: #50b6fe;
}
    .shop-index-page .menu {height: auto; background: #fff;}
    .shop-index-page .menu .item {height: auto; width: 1%; padding: 0.5rem 0; margin: 0; color: #636363; text-align: center; display: table-cell;position: relative;}
    .shop-index-page .menu .item:after  {position: absolute;content: '';left:-1px;top:0.5rem;bottom:0.5rem;border-left:1px solid #d9d9d9;}
    .content-empty{padding:1rem 0;margin:0;}
source{
    min-width: 100%;
    min-height: 100%;
    height: auto;
    width: auto;
}
.fui-picturew .item .vote-title{
    width: 100%;
    background:#fff;
    padding: 0 10px;
    -webkit-border-bottom-right-radius: 0.2rem;
    -moz-border-radius-bottomright: 0.2rem;
    border-bottom-left-radius: 0.2rem;
    height: 1.2rem;
    line-height: 1.2rem;
    color: #333;
    font-size: 0.65rem;
}
</style>

<div class="fui-page shop-index-page" style="display:block;">
	<!-- 关注按钮 -->
	<div class="fe-guide" ng-if="pagedata.isfollow==0" style="display:block;z-index:890;">
		<div class="fe-guide-faceimg"><img ng-src="{{tomedia(pagedata.pluginset.logo) || '../core/resource/images/nopic.jpg'}}" /></div>
		<div class="fe-guide-sub" onclick="$('#followbar').modal();">立即关注</div>
		<div class="fe-guide-text">
			<p class="">{{pagedata.pluginset.followtitle ||'加关注,更多权限！'}}</br>{{pagedata.pluginset.followdesc ||'关注公众号，享专属服务'}}</p>
		</div>
	</div>
	<div id="followbar" class="modal fade" tabindex="-1" style="z-index:99999;display:none;position: absolute">
		<div class="modal-dialog" style="width:80%;left:10%">
			<div class="wap-qrcode-container">
				<p class="example1">{{pagedata.pluginset.title || '欢迎浏览'}}</p>
					<div class="wap-qrcode-image">
						<img ng-src="{{tomedia(pagedata.pluginset.ewm) || '../core/resource/images/nopic.jpg'}}"/>
					</div>
				<p class="example1">长按二维码关注</p>
				</div>
		</div>
	</div>
    <div class="fui-content" style="padding-bottom:4rem">
		<div id="carousel-container" class="carousel slide" data-role="carousel" data-param-auto="true">
					<div class="carousel-inner" role="listbox" style="height:auto">
					<div ng-class="{'item':1,'active':$index==0}" ng-repeat="item in pagedata.banner">
						
						<a href="{{item.url}}">
							<img src="{{tomedia(item.picurl) || '../addons/jy_videoshop/resource/images/hdp01.jpg'}}" style="display: block; width: 100%; height: 100%;">
						</a>
					</div>
					</div>
						<style>
								.fui-swipe-page .fui-swipe-bullet {background: {background}; opacity: {opacity};}
								.fui-swipe-page .fui-swipe-bullet.active {opacity: 1;}
						</style>
						<div id="carousel-jinyun" class="fui-swipe-page" style="padding: 0 5px; bottom: 10px; ">
							<div class="fui-swipe-bullet" ng-repeat="item in pagedata.banner" ng-class="{'active':$index==0}" data-target="#carousel-container" data-slide-to="{{$index}}"></div>
						</div>
		</div>
		<div class="menu">
            <a class="item external" ng-click="access_json('jy_vote/myshoucang/')">
                <span class="text">我的收藏</span>
            </a>
            <a class="item external" ng-click="access_json('jy_vote/myzuji/')">
                <span class="text">我的足迹</span>
            </a>
        </div>
		<div ng-if="pagedata.notices.length>0 && pagedata.pluginset.on_notice==1" class="fui-notice">
			<div class="image"><img src="../core/resource/images/diy/hotdot.jpg"></div>
			<div class="icon"><i class="fa fa-volume-up" style="font-size: 0.7rem;"></i></div>
			<div class="text">
				<ul>
						<li ng-repeat="item in pagedata.notices">
							<a href="javascript:;" ng-click="access_json('core/article.list/detail/id='+item.id)">{{item.title}}</a>
						</li>
				</ul>
			</div>
		</div>
		<script type="text/javascript">
			function autoScroll(obj){
				$(obj).find("ul").animate({  
					marginTop : "-1rem"  
				},800,function(){  
					$(this).css({marginTop : "0px"}).find("li:first").appendTo(this);  
				})  
			}  
			$(function(){  
				setInterval('autoScroll(".fui-notice .text")',3000);
			}) 
		</script>
		<div ng-include="sys_html('_bankuai1','','','jy_videoshop')"></div>
		<div class="fui-searchbar bar" style="z-index: 0;">
			<div ng-class="{'searchbar':1,'searchbar-active':pagedata.searchbar ==1}" style="background:#f7f7f7">
					<div style="position: relative;left:0;top:0;">
						<div class="search-input">
							<i id="searchsub" class="fa fa-search"  ng-click="pagedata.getlist(1);"></i>
							<input type="search" placeholder="输入搜索" class="search" ng-model="pagedata.params.keyword" style="text-align: left; color: #999; font-size:0.56rem;background:#fff" />
						</div>
					</div>
			</div>
		</div>
		<div style="padding:0 0.5rem">
		<div class="live-list" style="margin-top:0">
            <div class="fui-list" style="padding:0.5rem;height:auto" ng-repeat="item in pagedata.list" ng-if="$index==0">
                <div class="fui-list-media">
                    <a ng-click="access_json('jy_vote/o_detail//id='+item.id)"  data-nocache="true">
                        <span class="live-living">
                                <i></i>点赞冠军
                         </span>
                        <img  style="border-radius:0.3rem" ng-src="{{tomedia(item.thumb) || '../core/resource/images/banner-1.jpg'}}" alt="{{item.title}}">
                    </a>
                </div>
                <div class="fui-list-inner">
                    <a href="javascript:;" ng-click="access_json('jy_vote/o_detail//id='+item.id)" data-nocache="true">
                        <h3>{{item.title}}</h3>
                    </a>
					<span class="overflow-h" style="font-size:0.65rem">{{item.infomsg}}</span>
                    <p>{{item.createtime}} 开抖</p>
                    <div class="live-list-subscribe">
                        <span>点赞人数 {{item.likes}}</span>
						<span>
                            <a href="javascript:;" ng-click="access_json('jy_vote/o_detail//id='+item.id)" class="live-subscribe-a live-subscribe-full-a">观看抖音</a>
                        </span>
                    </div>
                </div>
            </div>
        </div>
		
		<div ng-if="pagedata.list" class="fui-goods-group block">
			<div ng-repeat="item in pagedata.list" class="fui-goods-item">
				<div href="javascript:;" ng-click="access_json('jy_vote/o_detail//id='+item.id)" ng-class="{'image':1, 'echelon':item.active.title}" data-text="{{item.active.title}}" style="height:160px;background-image: url('{{tomedia(item.thumb) ||'../core/resource/images/nopic.jpg'}}')">
				</div>
				<div ng-if="item.video && false" ng-click="access_json('jy_vote/o_detail//id='+item.id)" class="image" style="height:160px;padding-bottom:0;background:#000">
					 <video ng-src="{{tomedia(item.video)}}" ng-poster="{{tomedia(item.thumb)}}" height="160px" width="100%"  x5-playsinline="" playsinline="" webkit-playsinline="" preload="auto" controls="controls"></video>					
				</div>
				<div href="javascript:;" ng-click="access_json('jy_vote/o_detail//id='+item.id)" class="detail" style="height:3.6rem">
					<a>
						<div class="name">
							{{item.title}}
						</div>
					</a>
					<div class="price" style="margin-top: 0.1rem">
						<span class="member"><img class="avatar" ng-src="{{tomedia(item.avatar) || '../core/resource/images/nopic.jpg'}}"> {{item.realname || '匿名'}}</span>
						<span class="subtitle" style="font-weight:400"><i class="icon icon-good"></i> {{item.likes || 0}}</span>
					</div>
				</div>
			</div>
		</div>
		</div>
		<div ng-if="loading" class='infinite-loading'><span class='fui-preloader'></span><span style="margin-left:1.5rem"> 正在加载...</span></div>
	</div>
</div>
<div ng-include="sys_html('_footer')"></div>
<script>
require(['bootstrap', 'hammer'], function($, Hammer){
		$('#carousel-container').carousel();
		var mc = new Hammer($('#carousel-container').get(0));
		mc.on("panleft", function(ev) {
			$('#carousel-container').carousel('next');
		});
		mc.on("panright", function(ev) {
			$('#carousel-container').carousel('prev');
		});
});
scope.loading = true;  //状态标记
scope.isnodata = false;
scope.pagedata.list =[];
//滚动加载
scope.pagedata.params.keyword = ''
var page = 1;
scope.pagedata.getlist=function(type){
		if(type=='1'){
			page = 1;
			scope.pagedata.list =[];
		}else{
			
		}
		scope.get('jy_vote/index/getlist/videoshop=1&page='+page+'&keyword='+scope.pagedata.params.keyword,
				function(data){			
				if(data.error !=1){
								for (var i=0;i<data.list.length;i++){
									scope.pagedata.list.push(data.list[i]);
								}
								if(page >1){
									$("#listitem").animate({scrollTop:0},300);
								}
								if(data.list.length<1){
									scope.isnodata=true;
								}
								page++;
								scope.loading = false;
								scope.$evalAsync();
							}else{
								console.log('error!');
							};
			});
}
scope.pagedata.getlist(1);
scope.pagedata.scroll_bottom=function(){
	if(!scope.isnodata && !scope.loading){
		scope.pagedata.getlist();
	}
}
</script>